package com.app.util.printer;

import com.app.util.string.StringUtil;

public class Printer {

	private int lastLen = 0;

	public void print(String s) {
		if (lastLen == 0) {
			lastLen = StringUtil.lengthOfGBK(s);
		}
		if (StringUtil.lengthOfGBK(s) > lastLen) {
			System.out.print(s + "\r");
		} else {
			System.out.print(StringUtil.toGBKLength(s, lastLen + 3, ' ') + "\r");
		}
		lastLen = StringUtil.lengthOfGBK(s);
	}

} 
